package com.weipai.springboot.module.dao.impl;

import com.weipai.springboot.model.ShopCollection;
import com.weipai.springboot.module.dao.ShopCollectionDao;
import com.weipai.springboot.module.mapper.ShopCollectionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 曹朋飞
 * @Date: 2018/09/14 19:11
 */
@Repository
public class ShopCollectionDaoImpl implements ShopCollectionDao {
    
    @Autowired
    private ShopCollectionMapper shopCollectionMapper;
    
    @Override
    public List<ShopCollection> verGoodsCollection(String customerId, String shopId) {
        return shopCollectionMapper.verGoodsCollection(customerId, shopId);
    }

    @Override
    public int insert(ShopCollection shopCollection) {
        return shopCollectionMapper.insertSelective(shopCollection);
    }

    @Override
    public List<ShopCollection> selectAllByShopCollection(String customerId, Integer page, Integer size) {
        return shopCollectionMapper.selectAllByShopCollection(customerId,page,size);
    }

    @Override
    public int deleteByPrimaryKey(String customerId, String shopId) {
        return shopCollectionMapper.deleteByPrimaryKey(customerId, shopId);
    }

    @Override
    public int deleteByAllShop(String customerId) {
        return shopCollectionMapper.deleteByAllShop(customerId);
    }
}
